<template>
  <div class="hospital flex flex-wrap">
    <div
      class="card w-[48%] mt-[20px] mr-[15px] p-[10px] flex justify-between h-[100px] rounded-lg cursor-pointer shadow-0 hover:shadow group ease-in-out"
      v-for="(item, index) in hospList"
    >
      <div class="left flex flex-col justify-between">
        <div class="name font-1 group-hover:font-extrabold">{{ item.hosname }}</div>

        <div class="info flex">
          <div class="flex level font-2 mr-[100px]">
            <i-ep-Edit class="mr-[5px]" />
            <span> {{ item.param.hostypeString }}</span>
          </div>
          <div class="time flex font-2"><i-ep-Stopwatch class="mr-[5px]" /><span>每天 8:45 放号</span></div>
        </div>
      </div>
      <div class="logo w-[80px] h-[80px] group-hover:scale-[1.1]">
        <img :src="'	data:image/jpeg;base64,' + item.logoData" alt="医院logo" />
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
// 导入首页的类型
import type { hospType } from '@/types/home';
// // 纯类型传参
let props = defineProps<{
  hospList?: Array<hospType>;
}>();

//解构有响应式
let { hospList } = toRefs(props);
</script>

<style scoped lang="scss"></style>
